﻿using RestSharp;
using System;
using System.Web;
using Ymatou.ServiceCenter;
using YmtAuth.AppService;
using YmtAuth.Domain.Shard;
using YmtAuth.Dto;
using YmtSystem.CrossCutting;
using ResetService = ServiceStack.Service;

namespace YmtAuth.Web.Handlerv2
{
    
    public class GetUserBillsRequestHandler : ResetService
    {
        private IUserBillsAppService BillsAppService { get { return LocalServiceLocator.GetService<IUserBillsAppService>(); } }
          //java
        [ServiceRegister("/json/reply/GetUserBillsRequestDto", Method.GET)]
        public object Get(GetUserBillsRequestDto dto)
        {
            HttpContext.Current.Request.Headers.Add(YmtUserKey.RequestId, Guid.NewGuid().ToString("N"));
            HttpContext.Current.Request.Headers.Add(YmtAuthSafeConstant.ApiId, YmtAuthSafeConstant.Api_login);

            return BillsAppService.GetUserBills(dto, Request);
        }
    }
}